<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>视频列表</title>
    <link th:href="@{css/video_list.css}" rel="stylesheet">
    <script th:src="@{js/jquery-1.10.2.min.js}"></script>
    <script type="text/javascript">
        $(function(){
            var videos = $(".video");
            $.each(videos,function(index,video){
                $(this).hover(function(){
                    $(this).stop().animate({marginTop:"30px"},300);
                    $(this).next().stop().animate({marginTop:"40px"},300);
                },function(){
                    $(this).stop().animate({marginTop:"35px"},300);
                    $(this).next().stop().animate({marginTop:"35px"},300);
                })
            })
        })
    </script>
</head>
<body>
    <div class="video_nav">
        <img class="nav_img" th:src="@{img/aynu.png}">
        <div class="nav_text">我的视频网</div>
        <a class="upload_video" th:href="${#httpServletRequest.getScheme() + '://' + #httpServletRequest.getServerName() + ':' + #request.getServerPort()  + #request.getContextPath()}">视频上传</a>
    </div>

    <div class="video" th:each="video:${videos}">
        <a th:href="${#httpServletRequest.getScheme() + '://' + #httpServletRequest.getServerName() + ':' + #request.getServerPort()  + #request.getContextPath() + '/queryAllById?id='}+${video.id}" target="_blank"></a>
        <img class="img" th:src="${'file'}+ '/' +${video.video_cover_pic}">
<!--        <img class="img" th:src="@{video/68dc064e-6dd5-41aa-bb32-03d7d7e74b22.jpg}">-->
<!--        <img class="img" th:src="${#httpServletRequest.getScheme() + '://' + #httpServletRequest.getServerName() + ':' + #request.getServerPort()  + #request.getContextPath() + '/video/'}+${video.video_cover_pic}">-->
<!--        <img class="img1" th:src="@{img/aynu.png}">-->
        <div class="title" th:text="${video.video_title}"></div>
        <div class="time">时长：[[${video.video_time}]]</div>
        <div class="author">作者：[[${video.video_author}]]</div>
        <div class="date">发布日期：[[${video.release_time}]]</div>
        <div class="hot">点击数：[[${video.number_of_hits}]]</div>
        <a class="delete" th:href="${#httpServletRequest.getScheme() + '://' + #httpServletRequest.getServerName() + ':' + #request.getServerPort()  + #request.getContextPath() + '/removeVideoById?id='}+${video.id}+'&video_file_path='+${video.video_file_path}+'&video_cover_pic='+${video.video_cover_pic}">删除</a>
    </div>
</body>
</html>